$OpenBSD: patch-src_tk_tkfont_c,v 1.2 2017/05/09 13:01:42 espie Exp $
Index: src/tk/tkfont.c
--- src/tk/tkfont.c.orig
+++ src/tk/tkfont.c
@@ -228,7 +228,7 @@ Tk_NameOfFontStruct(fontStructPtr)
 
     if (!initialized) {
 	printid:
-	sprintf(string, "font id 0x%x", fontStructPtr->fid);
+	snprintf(string, 20, "font id 0x%lx", fontStructPtr->fid);
 	return string;
     }
     fontHashPtr = Tcl_FindHashEntry(&fontTable, (char *) fontStructPtr);
